package com.evenvi.aio;

public class TimeClient {
    private String host;
    private int port;

    public TimeClient(String host, int port){
        this.host = host;
        this.port = port;
    }

    public void start(){
        new Thread(new AsyncTimeClientHandler(host, port), "AIOTimeClient-001 ").start();
    }

    public static void main(String[] args) {
        if(args.length != 2)
        {
            System.out.println("Sage: " + AsyncTimeClientHandler.class.getSimpleName() + " <host> <port>");
            return;
        }

        String host = args[0];
        int port = Integer.valueOf(args[1]);
        new TimeClient(host, port).start();
    }
}
